* Readme on data and results generating programs for Daysal, Simonsen, Trandafir & Breining: "Spillover Effects of Early Medical Interventions"*

Program: 				The estimation data set has been generated in SAS 9.4 (windows version 6.2.9200)
Location of data generating files: 	G:\Data\Workdata\702727\zhl\nicu_restat_sas\txt files for restat

To create the estimation data, follow the following steps:
1. Run "00 NICU.sas" - this program generates the initial master data for the project without sample selections. outputs nicu_master_060814.sas7bdat
2. Run "01 Finishing data.sas" - this program prepares the data for analysis. inputs register data and nicu_master_060814.sas7bdat, outputs nicu_samlet.sas7bdat
3. Run "02 Adding outcomes.sas" - inputs register data and nicu_samlet.sas7bdat, outputs nicu_outcomes.sas7bdat
4. Run "03 Adding divorce.sas" - inputs register data and nicu_outcomes.sas7bdat, outputs nicu_divorce.sas7bdat
5. Run "04 Adding maternity leave RV.sas" - inputs register data and nicu_divorce.sas7bdat, outputs nicu_maternity.sas7bdat
6. Run "05 New parental controls.sas" - inputs register data and nicu_maternity.sas7bdat, outputs nicu_controls.sas7bdat
7. Run "06 Adding parental labor outcomes rev.sas" - inputs register data and nicu_controls.sas7bdat, outputs nicu_LS_rev060919.sas7bdat
8. Run "06a Adding child diagnosis.sas" - inputs register data and nicu_LS_rev060919.sas7bdat, outputs nicu_childhealth.sas7bdat
9. Run "06b Adding parental diagnosis.sas" - inputs register data and nicuchildhealth.sas7bdat, outputs nicu_parentalhealth.sas7bdat
10. Run "06c Adding parent med use.sas" - inputs register data and nicu_parentalhealth.sas7bdat, outputs nicu_all.sas7bdat & nicu_data290115.dta
11. Run "06d Adding date of death.sas" - inputs register data and nicu_parentalhealth.sas7bdat, outputs death.dates.dta
12. Run "06e Adding educ track rev.sas" - inputs register data and nicu_parentalhealth.sas7bdat, outputs track_rev19082019.dta
13. Run "06f Stillbirth.sas" - inputs register data and nicu_parentalhealth.sas7bdat, outputs stillborn_analysis.dta
14. Run "06g icd8 mult and still.sas" - inputs register data, outputs birth_details.dta
15. Run "07 Diagnosis - detail.sas" - inputs register data, outputs diagnosis.dta
16. Run "08 Date of 9th grade completion (date of test).sas" - inputs register data, outputs year_completed.dta

Program: 				The final data set has been generated in Stata/SE 15.1 (Windows version 6.2.9200)
Location of data generating files: 	G:\Data\Workdata\702727\FBOI\Programs

To create the final analysis dataset and all the results reported in the paper and in the appendix, uncomment the last 30 lines in the file "09 Final data preparation and analyses.do" and run in Stata.


Original Data:
The data used in the paper are administrative Danish data maintained by Statistics Denmark, which is kept in a secure server. The data can, however, be accessed remotely from within Danish universities and research institutions. If a researcher at a university or other research institution outside Denmark wishes to use these data, this may be accomplished by visiting a Danish research institution or by cooperating with researchers or research assistants working in Denmark. Should a researcher wish to replicate our results, we will gladly provide a list of all the registers used as well as the instructions for gaining access to the data.
